package com.onpositive.dataminer.rcp;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import com.onpositive.knowledge.model.IThing;
import com.onpositive.semantic.model.ui.roles.IInformationalControlContentProducer;

public class ThingTooltip implements IInformationalControlContentProducer {

	public ThingTooltip() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public Object create(Object owner, Object parent, Object element,
			String role, String theme, String defContent) {
		Composite parent2 = (Composite) parent;
		parent2.setLayout(new GridLayout());
		Browser bs=new Browser(parent2, SWT.NONE);
		IThing t=(IThing) element;
		
		bs.setUrl("http://en.wikipedia.org/wiki/"+t.getId());
		bs.setLayoutData(new GridData(500, 500));
		return bs;		
	}

}
